#define _CRT_SECURE_NO_WARNINGS 1
#include <iostream>
#include<set>
using namespace std;
//#define int long long 
const int N = 1e5 + 10;
const int MOD = 1e9 + 7;
typedef pair<int, int> PII;

PII q[N];

void solve()
{
	int n;
	cin >> n;
	char op[2];
	int a, b;
	set<PII> s;
	set<PII> f;
	int j = 0;
	for (int i = 0; i < n; i++)
	{
		cin >> op >> a >> b;
		if (op[0] == '+')
		{
			q[i] = { a, b };
			bool flag = false;
			for (auto p : s)
			{
				if ((a >= p.first && a <= p.second) || (b >= p.first && b <= p.second))
				{
					flag = true;
					f.insert({ a, b });
					f.insert(p);
					break;
				}
			}
			s.insert({ a, b });
			if (flag)
				cout << "YES" << endl;
			else cout << "NO" << endl;
		}
		else
		{
			if (f.find({ a, b }) == f.end())
			{
				cout << "NO" << endl;
				s.erase({ a ,b });
			}
			else
			{
				s.erase({ a, b });
				f.erase({ a, b });
				for (auto t : f)
				{
					int x = t.first, y = t.second;
					for (auto p : f)
					{
						if (p.second > y)
							break;
						if ((p.first >= x && y >= p.first) || ((x <= p.second) && (y >= p.second)))
							cout << "YES" << endl;
						else cout << "NO" << endl;
					}
				}
			}
		}
	}
}
signed main()
{
	int t = 1;
	//cin >> t;
	while (t--)
		solve();
	return 0;
}